<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        li {
            list-style: none;
        }
        .box {
            width: 1200px;
            height: 400px;
            border: 1px solid #000;
            overflow: hidden;
            margin: 100px auto;
        }
        .box ul{
            display: flex;
        }
        .box li {
            width: 240px;
        }
    </style>
</head>
<body>
    <div class="box">
        <ul>
            <li><img src="images/1.jpg" alt=""></li>
            <li><img src="images/2.jpg" alt=""></li>
            <li><img src="images/3.jpg" alt=""></li>
            <li><img src="images/4.jpg" alt=""></li>
            <li><img src="images/5.jpg" alt=""></li>
        </ul>
    </div>
</body>
<script src="../jquery-1.12.4.js"></script>
<script>
    $(function(){
        $('li').on('mouseenter',function(){
            $(this).stop(true,false).animate({width:800}).siblings().stop(true,false).animate({width:100})
        })
        $('li').on('mouseleave',function(){
            $('li').stop().animate({width:240})
        })
    })
</script>
</html>